package clickstreamhack;

import java.util.Date;
import java.util.Enumeration;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.opensymphony.clickstream.ClickstreamRequest;

public class HackedClickstreamRequest extends ClickstreamRequest {

	private static final long serialVersionUID = 2354400674177000299L;
	
	private ClickstreamRequest clickstreamRequest;

	private String body;

	private Map<String, Enumeration> headers;

	public HackedClickstreamRequest(ClickstreamRequest clickstreamRequest) {
		super(Clickstream102HackFilter.getRequest(), clickstreamRequest.getTimestamp());
		this.clickstreamRequest = clickstreamRequest;
		this.body = Clickstream102HackFilter.getReqeustBody();
		this.headers = Clickstream102HackFilter.getReqeustHeaders();
	}
	
	public HackedClickstreamRequest(HttpServletRequest request, Date timestamp) {
		super(request, timestamp);
	}

	public String getProtocol() {
		return clickstreamRequest.getProtocol();
	}

	public String getQueryString() {
		return clickstreamRequest.getQueryString();
	}

	public String getRemoteUser() {
		return clickstreamRequest.getRemoteUser();
	}

	public String getRequestURI() {
		return clickstreamRequest.getRequestURI();
	}

	public String getServerName() {
		return clickstreamRequest.getServerName();
	}

	public int getServerPort() {
		return clickstreamRequest.getServerPort();
	}

	public Date getTimestamp() {
		return clickstreamRequest.getTimestamp();
	}

	public String toString() {
		return clickstreamRequest.toString();
	}

	public String getBody() {
		return body;
	}

	public Map<String, Enumeration> getHeaders() {
		return headers;
	}
	
	

}
